<?

require_once ("application.fieldset.inc");
require_once ("_field_sets/eve_man_registrations.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;
global $_IFACE_CONTROL_OBJECT;
global $_SET_TABBING;

$_SET_TABBING = true;

$fs_local_document = $_REQUEST["PHP_SCRIPT"];

$request_event_id = $_REQUEST["event_id"];

$return_path = array (
	array (
		fs_tab=>"eve_man_registrations",
		fs_tab_option=>"lc_eve_man_registrations",
		object_id=>"event_id",       
		object_value=>$_REQUEST["event_id"],
	)       
);		 

$return = _app_create_tabbing ("{$fs_local_document}?", $return_path);

$fs_options = array (
	addnew=>array (label=>"Add New"),
	create=>array (label=>"Create"),
	modify=>array (label=>"Modify"),
	remove=>array (label=>"Remove"),
	update=>array (label=>"Update"),
	cancel=>array (label=>"Cancel"),
	delete=>array (label=>"Delete",
			redirect=>$return),
	canret=>array (label=>"Cancel",
			redirect=>$return),
	close=>array (label=>"Close",
			redirect=>$return),
);

list ($fs_input, $fs_action, $store, $valid, $success) =

	_app_process_fieldset (array (
		fieldset=>$fs_eve_man_registrations,
		fs_options=>$fs_options,
		fs_action=>($_REQUEST["fs_action"] ?
				$_REQUEST["fs_action"] :
				"addnew"),
		fs_primary_key=>"registration_id",
));

$_REQUEST["event_id"] = $request_event_id;

$fs_link_path = array (
	array (
		fs_action=>"view",
		fs_tab=>"eve_man_registrations",
		fs_tab_option=>"fs_eve_man_registrations",
		object_id=>"event_id",       
		object_value=>$_REQUEST["event_id"],
	)       
);

$fs_link = _app_create_tabbing ("{$fs_local_document}?", $fs_link_path);

$_OBJECT_FIELDSET_CONTROL =_app_create_fieldset_object (array (
	fieldset_id=>"fs_eve_man_registrations",
	db_conn=>$_GLOBAL_DBH,
	fieldset=>$fs_eve_man_registrations,
	fs_action=>$fs_action,
	fs_input=>$fs_input,
	fs_link=>$fs_link,
	fs_options=>$fs_options,
));

array_push ($_IFACE_CONTROL_OBJECT, $_OBJECT_FIELDSET_CONTROL);

#if ($_REQUEST["registration_id"] > 0) {

#	if (isset ($_REQUEST["fs_action_icpoe"]))
#			require_once ("fs_eve_man_registration_entry.inc");
#	else require_once ("lc_eve_man_registration_entry.inc");
#}

?>
